package com.neusoft.taotao.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * 
 * @author chens
 *
 */
@RestController
public class HelloController {

	@RequestMapping("/hello")
	public String sayHello(@RequestParam(name = "name", defaultValue = "String boot") String name) {

		return "hello dev:" + name;
	}

	@RequestMapping("/show")
	public ModelAndView show() {
		ModelAndView view = new ModelAndView("index");

		view.addObject("name", "我来自thymeleaf模板");

		return view;
	}

}
